<template>
	<image :src="sheep.$url.static(state.banner)" class="banner" @click="toPage"/>
</template>


<script setup>
import {onLoad} from "@dcloudio/uni-app";
import {reactive} from "vue";
import sheep from "@/sheep";

const state = reactive({
	banner: ''
})

function toPage() {
	sheep.$router.go('/pages/goods/preList')
}

onLoad(async () => {
	// 读取字典
	let image_store = await sheep.$api.order.channelList({type: 'image_store'});
	image_store.forEach(e => {
		if (e.dictLabel == 'new_func_banner') {
			state.banner = e.dictValue;
		}
	})
});
</script>

<style lang="scss" scoped>

.banner {
	width: 97%;
	margin-left: 1.5%;
	margin-top: 10rpx;
	border-radius: 10rpx;
	height: 220rpx;
	box-shadow: 1px 1px 50px #cccccc
}
</style>
